package com.alit.mongodb.dao;

import java.util.List;

import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;

import com.alit.mongodb.doc.Page;
import com.mongodb.WriteResult;

public interface IMongoDao<T> {
  public List<T> find(Query query);

  public T findOne(Query query);

  public void save(T entity);

  public WriteResult update(Query query, Update update);

  public List<T> findAll(String collectionName);

  public long count(Query query);

  public WriteResult remove(Query query);

  public Page<T> findPage(Page<T> page, Query query);
}
